import request from '@/utils/request'

// 查询店铺列表
export function getStoreList() {
  return request({
    url: '/seller/storeUserRelate/getStoreList',
    method: 'get',
  })
}

// 查询用户列表
export function getErpUserList() {
  return request({
    url: '/seller/storeUserRelate/getErpUserList',
    method: 'get',
  })
}


// 查询用户店铺维护关联列表
export function listStoreUserRelate(query) {
  return request({
    url: '/seller/storeUserRelate/list',
    method: 'get',
    params: query
  })
}

// 查询用户店铺维护关联详细
export function getStoreUserRelate(id) {
  return request({
    url: '/seller/storeUserRelate/getDetail/' + id,
    method: 'get'
  })
}

// 新增用户店铺维护关联
export function addStoreUserRelate(data) {
  return request({
    url: '/seller/storeUserRelate/add',
    method: 'post',
    data: data
  })
}

// 修改用户店铺维护关联
export function updateStoreUserRelate(data) {
  return request({
    url: '/seller/storeUserRelate/edit',
    method: 'post',
    data: data
  })
}

// 删除用户店铺维护关联
export function delStoreUserRelate(id) {
  return request({
    url: '/seller/storeUserRelate/remove/' + id,
    method: 'get'
  })
}


// 修改商品提成配置
export function updateProductUserRelate(data) {
  return request({
    url: '/seller/storeUserProductRelate/edit',
    method: 'post',
    data: data
  })
}


// 新增商品提成配置
export function addProductUserRelate(data) {
  return request({
    url: '/seller/storeUserProductRelate/add',
    method: 'post',
    data: data
  })
}

// 查询商品提成配置详情
export function getProductUserRelate(id) {
  return request({
    url: '/seller/storeUserProductRelate/getDetail/' + id,
    method: 'get',
  })
}

// 删除用户产品配置
export function delProductUserRelate(id) {
  return request({
    url: '/seller/storeUserProductRelate/remove/' + id,
    method: 'get'
  })
}

// 查询产品列表
export function getProductList(data) {
  return request({
    url: '/seller/storeUserProductRelate/getProductList',
    method: 'get',
    params: data
  })
}

// 查询用户产品产品配置列表
export function listProductUserRelate(data) {
  return request({
    url: '/seller/storeUserProductRelate/list',
    method: 'get',
    params: data
  })
}

// 查询订单提成列表
export function queryOrderCommissionList(data) {
  return request({
    url: '/seller/internetCelebrityStatistic/list',
    method: 'get',
    params: data
  })
}

// 查询店铺提成信息
export function queryShopCommissionInfoList(data) {
  return request({
    url: '/seller/internetUserStoreStatistic/list',
    method: 'get',
    params: data
  })
}

// 重新计算
export function restTrial(data) {
  return request({
    url: '/seller/internetUserStoreStatistic/restTrial',
    method: 'post',
    data: data
  })
}

// 重新计算
export function confirmCommission(data) {
  return request({
    url: '/seller/internetUserStoreStatistic/confirm',
    method: 'post',
    data: data
  })
}
